<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@ page import="dto.TcmDetailDto" %>
<%@ page import="pojo.TcmRelation" %>
<%@ page import="java.util.List" %>
<%@ page import="dto.CFQueryListDto" %>
<%@ page import="pojo.ClassicFormulaComposition" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>经方展示</title>
</head>
<script>
	function backToList() {
		location="/TcmSystem/CFServlet?action=list&curPage=1";
	}
</script>
<body>
<%
	CFQueryListDto dto = (CFQueryListDto)request.getAttribute("detail");
%>

<h1 align="center">药品细节</h1>
<table border="2" width="500px" align="center">
	<tr>

		<td>经方名称</td>
		<td>别名</td>
		<td>用法</td>
		<td>备注</td>

	</tr>
	<tr>
		<td><%=dto.getCf().getName() %> </td>
		<td><%=dto.getCf().getAlias() %> </td>
		<td><%=dto.getCf().getUsage() %> </td>
		<td><%=dto.getCf().getComment() %> </td>
		</tr>
	<tr>
		<td align="center" colspan="6">中药名</td>
		<td align="center" colspan="6">用量</td>
		<td align="center" colspan="6">煎制方法</td>
	</tr>
	<%
		for(ClassicFormulaComposition cFC:dto.getCfcList()){	%>
	<tr>

		<td colspan="6"><%=cFC.getTcm().getName()    %> </td>
		<td colspan="6"><%=cFC.getDosage()   %> </td>
		<td colspan="6"><%=cFC.getUsage()    %> </td>


	</tr>
	<%} %>
</table>
<div align="center">
	<input align="center" type="button" value="返回" onclick="backToList();"/>
</div>

</body>
</html>